decrease and conquerの例文
- Binary search, a decrease and conquer algorithm where the subproblems are of roughly half the original size, has a long history.
- As such, it is a form of decrease and conquer algorithm, where at each step the decrease is by a constant factor.
- While a clear description of the algorithm on computers appeared in 1946 in an article by John Mauchly, the idea of using a sorted list of items to facilitate searching dates back at least as far as Babylonia in 200 BC . Another ancient decrease and conquer algorithm is the Euclidean algorithm to compute the greatest common divisor of two numbers by reducing the numbers to smaller and smaller equivalent subproblems, which dates to several centuries BC.
- This is because Quickselect is a decrease and conquer algorithm, and using the median at each pivot means that at each step the search set decreases by half in size, so the overall complexity is a geometric series times the complexity of each step, and thus simply a constant times the complexity of a single step, in fact 2 = 1 / ( 1-( 1 / 2 ) ) times ( summing the series ).